<%@page import="net.tanesha.recaptcha.ReCaptchaFactory"%>
<%@page import="net.tanesha.recaptcha.ReCaptcha"%>
<%
String title = (String) request.getAttribute("title");
String description = (String) request.getAttribute("description");
String keywords = (String) request.getAttribute("keyword");
String[] check = (String[]) request.getAttribute("check");
String email = (String) request.getAttribute("email");
String website = (String) request.getAttribute("website");
String success = (String) request.getAttribute("success");
String customer = (String) session.getAttribute("customer");
%>
<jsp:include page="layout/header.jsp">
	<jsp:param name="title" value="<%=title %>"/>
	<jsp:param name="description" value="<%=description %>"/>
	<jsp:param name="keywords" value="<%=keywords %>"/>
</jsp:include>
<div id="mainpage">
    	<div id="maincontent">
        	<h1>Thanks for signing up.</h1>
            <div class="box-wrapper">
                <div class="useraction">
                    <div class="register">
                    	<%=(success != null)?"<p class='alert_message'>"+success+"</p><br/></br>":"" %>
                        <form action="/register" method="post">                       
                            <div class="textfield">
                                <label for="register-email">Email</label>
                                <%=(check[0] != null)?"<p style='color:red;'>"+check[0]+"</p>":"" %>
                                <input type="text" id="register-email" name="email" <%=(check[0] != null)?"style='border:1px solid red;'":"" %> <%=(email != null && !email.equals(""))?"value='"+email+"'":"" %>/>
                            </div>
                            <div class="textfield">
                                <label for="register-password">Password</label>
                                <%=(check[1] != null)?"<p style='color:red;'>"+check[1]+"</p>":"" %>
                                <input type="password" id="register-password" name="pwd" <%=(check[1] != null)?"style='border:1px solid red;'":"" %>/>
                            </div>
                            <div class="textfield">
                                <label for="register-retypePassword">Retype Password</label>
                                <%=(check[2] != null)?"<p style='color:red;'>"+check[2]+"</p>":"" %>
                                <input type="password" id="register-retypePassword" name="re_pwd" <%=(check[2] != null)?"style='border:1px solid red;'":"" %>/>
                            </div>
                            <div class="textfield">
                                <label for="register-website">Website</label>
                                <%=(check[3] != null)?"<p style='color:red;'>"+check[3]+"</p>":"" %>
                                <input type="text" id="register-website" name="website" <%=(check[3] != null)?"style='border:1px solid red;'":"" %> <%=(website != null && !website.equals(""))?"value='"+website+"'":"" %>/>
                                <div class="note">Example : http://example.com - This website will be used to monitor</div>
                            </div>
                            <div class="textfield">
                                <label for="register-website">Captcha</label>
                                <%=(check[4] != null)?"<p style='color:red;'>"+check[4]+"</p>":"" %>
                                <script>
						        	var RecaptchaOptions = { theme : 'clean' };
						  		</script>
								<%
									//6LdXmcISAAAAAHz6FsABghup-EayldUCiKQyDPAk //public
									//6LdXmcISAAAAANPIv5ykGg3LAlBMnUQHzy3-Kiqo //private
						          ReCaptcha c = ReCaptchaFactory.newReCaptcha("6Lf59ccSAAAAAEM1gkWavS_8iUlhO7GF_Y5GXzts", "6Lf59ccSAAAAANK1ZHc5x_r4dfk6mZQTEJCvjFlo", false);
						          out.print(c.createRecaptchaHtml(null, null));
						        %>
                            </div>
                            <button type="submit" class="button-style">SignUp</button>
                            <div class="clearbreak"></div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

<jsp:include page="/layout/footer.jsp">
	<jsp:param name="language" value="1"/>
</jsp:include>	